Skip to content

Add durable Cloudflare queue dispatch#2115

Merged
chubes4 merged 2 commits into
mainfrom
feat/2083-durable-queue-dispatch
Jul 27, 2026
Merged

Add durable Cloudflare queue dispatch#2115
chubes4 merged 2 commits into
mainfrom
feat/2083-durable-queue-dispatch

Conversation

@chubes4

@chubes4 chubes4 commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • move provisioning and publication execution from scheduled draining to versioned Cloudflare Queue wake-ups backed by canonical D1 state
  • enforce exact operation/publication identities, generation and lifecycle fencing, site-lane concurrency, persisted fairness, and global/per-principal backpressure
  • persist producer repair, delayed retries, processing ownership, terminal dead-letter evidence, and operator recovery commands
  • retain bounded scheduled WordPress due-event processing while keeping normal provisioning and publication Queue-only
  • expose x-wp-codebox-dispatch: queued|backpressured and cancel queued work during allocation deletion

Verification

  • npm run build
  • npm run test:cloudflare-runtime
  • npm run test:cloudflare-queue
  • npm run cloudflare:dry-run:d1 (23,319.62 KiB raw / 8,376.32 KiB gzip; DO, Queue, D1, R2)
  • npm run cloudflare:dry-run:public-reader (468.68 KiB raw / 115.52 KiB gzip; R2 only)
  • git diff --check origin/main...HEAD

AI Assistance

Substantive implementation and review assistance was provided through OpenCode using OpenAI gpt-5.6-sol, with an earlier Homeboy Cook candidate drafted using OpenAI gpt-5.6-terra. The agent was used to inspect the runtime contracts, implement queue and D1 state transitions, add behavioral tests, and review concurrency and retry semantics. Chris Huber reviewed and remains responsible for the change.

Closes #2083

@chubes4
chubes4 merged commit c3d5814 into main Jul 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dispatch Cloudflare site operations and publication routes through durable queues

1 participant